<?php

if(!defined('IN_refrigeratory')) {
	exit('Access Denied');
}

$operation = $_REQUEST["operation"];
$operations = array("info_order");

if (!in_array($operation, $operations)){
	echo '{"success":false, "info":"request params invalid"}';
	exit;
}

if ($operation == "info_order"){
	$id_shipment = $_REQUEST["id_shipment"];
	$sql = "SELECT id_order,m.name,id_batch,id_shipment,amount 
			FROM t_order o 
			LEFT JOIN t_medicine m ON o.id_medicine = m.id_medicine
			WHERE o.id_shipment = $id_shipment";
	echo get_json_from_sql($sql);
}

?>